Says which picture is thing number n: an enemy, an item, anything that stands in the view. The picture holds the thing’s frames one above the other, each frame_height rows tall. Call it in the Create event of the object that starts the view, with plain numbers.
Game Boy: not available
Game Boy Color: not available
On other consoles this differs: see Side by side and How the consoles differ.
view3d_thing(number, picture, frame_height)| Name | Type |
|---|---|
number | int |
picture | tileset |
frame_height | int |
Nothing.
Says which picture is thing number number: an enemy, an item, anything that stands in the 3D view. The picture is one in your Tilesets, like the wall pictures, and it holds the thing's frames one above the other, each frame_height rows tall. A picture 32 pixels wide and 128 rows tall with a frame height of 32 is four frames.
Call it in the Create event of the object that starts the view, with plain numbers (not variables): the build cuts the pictures into columns ahead of time, so it has to read them from the call.
i being i + 128), the thing pictures are drawn in the same colors, and color 0 is clear. If the wall pictures are any other picture, the things can be any colors; a pixel is clear when it is magenta (#FF00FF) or has no color. All of them share the one set of 256 colors.view3d_start(ts_doc_walls);
view3d_thing(0, ts_doc_things, 48); // thing 0: frames 48 rows tall
view3d_thing(1, ts_doc_things, 16); // thing 1 is another picture in practice; here the same one, cut in 16-row framesThe two numbers name two kinds of thing; draw them with view3d_draw_self or view3d_draw_thing.
The number and the frame height must be plain numbers (not variables), because the build cuts the picture ahead of time; the picture is named like the wall pictures. A thing picture is a tile set (width and height multiples of 8, not a whole-screen background picture), 8 to 255 pixels wide, with a frame height that is a multiple of 8. If the wall pictures are drawn in the 256-color rule (lit colors 1 to 127, the darker copy of color i being i + 128), the thing pictures must be drawn in the same colors, and color 0 is clear; any other wall pictures let the things be any colors, and a pixel is clear when it is magenta (#FF00FF) or has no color. One source pixel is 1/64 of a wall’s height: a picture 32 rows tall is half a wall high, and its bottom row stands on the floor. The things’ colors share the one set of 256 with the walls.